package net.csdra.wenhua.nanan.qiandao.service;

import net.csdra.wenhua.nanan.qiandao.domain.User;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * Created by xiaomi on 2017/2/20.
 */
public interface UserService {

    User createUser(CreateUser createUser);

    User updateUser(UpdateUser updateUser);

    User getUserById(String id);

    class CreateUser {

        String weixinId;
        String userInfo;

        public String getWeixinId() {
            return weixinId;
        }

        public void setWeixinId(String weixinId) {
            this.weixinId = weixinId;
        }

        public String getUserInfo() {
            return userInfo;
        }

        public void setUserInfo(String userInfo) {
            this.userInfo = userInfo;
        }

        @Override
        public String toString() {
            return "CreateUser{" +
                    "weixinId='" + weixinId + '\'' +
                    ", userInfo='" + userInfo + '\'' +
                    '}';
        }
    }

    class UpdateUser extends CreateUser {
        String userId;

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        @Override
        public String toString() {
            return "UpdateUser{" +
                    "userId='" + userId + '\'' +
                    '}';
        }
    }
    class GetUserPaged {
        int page;
        int size;

        public int getPage() {
            return page;
        }

        public void setPage(int page) {
            this.page = page;
        }

        public int getSize() {
            return size;
        }

        public void setSize(int size) {
            this.size = size;
        }

        @Override
        public String toString() {
            return "GetUserPaged{" +
                    "page=" + page +
                    ", size=" + size +
                    '}';
        }
    }
}
